const { dialog,ipcMain } = require('electron')
let fs = require('fs')
ipcMain.handle('on-deleteexamdata-event', async (e, filename,examData) => {
    fs.writeFile('./public/exam_'+filename, examData,  function(err) {
        if (err) {
            dialog.showMessageBox({
                message: err,
                type: 'error',
                title: '系统信息'
            })
            return console.error(err);
        }
        dialog.showMessageBox({
            message: "删除成功",
            type: 'info',
            title: '系统信息'
        })
    })
})